package com.demo.pattern.simplefactory.order;

import com.demo.pattern.simplefactory.pizza.CheesePizza;
import com.demo.pattern.simplefactory.pizza.GreekPizza;
import com.demo.pattern.simplefactory.pizza.Pizza;

/**
 * @author sourire
 * @version 1.0
 * @date 2020/8/18 11:25
 */
public class OrderPizza1 {
    public OrderPizza1(String orderType){
        Pizza pizza = SimpleFactory.createPizza(orderType);
        if(pizza == null){
            System.out.println("你要的披萨不存在");
        }else{
            pizza.makePizza();
        }
    }
}
